Multiplication operation expression#5186
Merged
sougou merged 27 commits intovitessio:masterfrom Oct 5, 2019
Merged
Conversation
…c.go - Added tests for Multiply() in arithmetic_test.go to cover code coverage - Implemented additional function floatTimesAny() to account for float values Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
- Added more tests in TestMultiply() in arithmetic_test.go to increase code coverage Signed-off-by: Rasika Kale <rasika@planetscale.com>
- Added more tests in arithmetic_test.go to confirm code is covered and error checking works Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com> Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
- Added more tests in arithmetic_test.go to fix code coverage - Added error checking into arithmetic.go - Implemented function floatMinusAny() for subtraction expression Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
…c.go - Added tests for Multiply() in arithmetic_test.go to cover code coverage - Implemented additional function floatTimesAny() to account for float values Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
- Added more tests in TestMultiply() in arithmetic_test.go to increase code coverage Signed-off-by: Rasika Kale <rasika@planetscale.com>
- Added more tests in arithmetic_test.go to confirm code is covered and error checking works Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Morgan Tocker <tocker@gmail.com>
… a split Signed-off-by: Yufei Chen <yufei@squareup.com>
ALso removes unused capabiltities code to silence staticcheck warning. Signed-off-by: Morgan Tocker <tocker@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
…wmult Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Rasika Kale <rasika@planetscale.com>
sougou
approved these changes
Oct 5, 2019
Contributor
sougou
left a comment
There was a problem hiding this comment.
We'll get this merged for now. I think further refactoring will be needed after the rest of the operations are added.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
partial fix for #5098
Multiply()to return a Value or an error. The output for this function represents the same output when two values are multiplied in MySQL. The following functions were added to achieve this:mutliplyNumericWithError()- operates the same way asaddNumericWithError(), and returns a numeric or an errorintTimesIntWithError()- operates the same way asintPlusIntWithError(), except both values are multiplieduintTimesIntWithError()- Checks if second value is less than 0 or if int64(first value) if less than 0. If so, then returns BIGINT UNSIGNED error. Otherwise, calleduintTimesUintWithError().uintTimesUintWithError()- Checks if result is less than first and second value. If so, then returns a BIGINT UNSIGNED error. Otherwise, returns Uint64 product.floatTimesAny()- Returns a numeric float64 values after multiplying a float64 value and a non-float64 value